<%-- 
    Document   : view_profile
    Created on : Mar 23, 2013, 10:14:24 PM
    Author     : Thinh
--%>

<%@tag description="put the tag description here" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>

<%-- The list of normal or fragment attributes can be specified here: --%>
<%@attribute name="message"%>

<%-- any content can be specified here e.g.: --%>
<!--<h2>View Profile</h2>-->
<s:actionerror cssStyle="color:red;"/>
<form id="profileForm" action="" method="POST" onsubmit="loadUserXMlFile(<s:property value="profile.user.id" />,'profileForm');  return false;" >
    <div id="profileInformation">
        <h2>${sessionScope['username']} 's Profile</h2>
         <table border="0">
        <tbody>
            <tr>
                <td>
                    First Name(*)
                </td>
                <td>
                    <input name="firstname" value="<s:property value="profile.firstname" />" title="max 20 characters" type="text" maxlength="20" required />                    
                </td
            </tr>
            <tr>
                <td>
                    Last Name(*)
                </td>
                <td>
                    <input name="lastname" value="<s:property value="profile.lastname" />" type="text" title="max 30 characters" maxlength="30" required />
                </td>
            </tr>
            <tr>
                <td>
                    Email(*)
                </td>
                <td>
                    <input name="email" type="email" value="<s:property value="profile.email" />" title="Please fill out your correct email" maxlength="50" required />
                </td>
            </tr>
            <tr>
                <td>
                    Address(*)
                </td>
                <td>
                    <textarea title="Please fill out your address" name="address" rows="5" cols="20" required ><s:property value="profile.address" /></textarea>
                </td>
            </tr>
            <tr>
                <td>
                    Phone Number
                </td>
                <td>
                    <input name="phoneNumber" value="<s:property value="profile.phoneNumber" />" type="tel" maxlength="13" pattern="[0-9]{6,20}" />
                </td>
            </tr>
            <tr>
                <td>

                </td>
                <td>
                    <input name="btnCheckout" type="submit" value="Submit" />
                    <input name="btnReset" type="reset" value="Reset" />
                </td>
            </tr>
        </tbody>
    </table>
    </div>
</form>
